<%--
说明：资源信息表 明细页面

@author liuxun 2012-03-18
--%>
<%@ include file="../../common/common.jsp"%>
<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<meta http-equiv="Expires" content="0" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<title>数据库信息明细</title>
<script type="text/javascript" charset="UTF-8">
var opeForm;
var grid;

$(function(){
	opeForm = $('#opeForm');
	
	grid=$('#listTable').datagrid({
		columns:[[

			{title:'资源账号',field:'rsc_acc',align:'center',width:100},
			
			{title:'账号状态',field:'rsc_acc_status_decode',align:'center',width:80},
			
			{title:'允许定期更新密码',field:'is_updte_pwd',align:'center',width:80, 
				formatter:function(value,rec){
					return value ==  '1' ? '<font color="green"> √ </font>' : '<font color="red"> × </font>';
				    }
			 },
			
			{title:'账号类型',field:'acc_type_decode',align:'center',width:80}

        ]],
		pagination:true,
		singleSelect: true
	});
	
	queryOperation();
});

//翻页时自动调用此函数
function onLoadPrev(msg){
	var queryParams=grid.datagrid('options').queryParams;
	queryParams['firstQuery']=false;
}

//查询操作
function queryOperation(){
	var params = opeForm.serializeObject();
	grid.datagrid("options").pageNumber = 1;
	grid.datagrid({
		url: 'C_RSC_ACC!queryList.do',
		queryParams: jQuery.extend({}, params, {'firstQuery': true})
	});
}
</script>
</head>

<body>
	<form id="opeForm" name="opeForm">
		<input type="hidden" name="model.rsc_id" value="${model.rsc_id }"/>
	</form>
      <table style="width: 100%; height: 100%" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td valign="top">

            <table border="0" cellpadding="0" cellspacing="0" class="infoTableBorder">
              <tr>
                <td>
                  <table style="width: 100%" align="center" border="0" cellPadding="0" cellSpacing="0" class="infoTable">
                    <tr align="center">
                      <td style="height: 40px; text-align: center;" colspan="2" class="infoContentTD">数据库明细信息&nbsp;</td>
                    </tr>

                    <tr>
                      <td align="right" class="infoLabelTD" width="20%" nowrap>资源组：&nbsp;</td>
                      <td align="left" class="infoContentTD" width="30%">&nbsp; ${model.rsc_grp_name}</td>
                    </tr>

                    <tr>
                      <td align="right" class="infoLabelTD" width="20%" nowrap>资源名称：&nbsp;</td>
                      <td align="left" class="infoContentTD" width="30%">&nbsp; ${model.rsc_name}</td>
                    </tr>

                    <tr>
                      <td align="right" class="infoLabelTD" width="20%" nowrap>管理IP：&nbsp;</td>
                      <td align="left" class="infoContentTD" width="30%">&nbsp; ${model.manage_ip}</td>
                    </tr>

                    <tr>
                      <td align="right" class="infoLabelTD" width="20%" nowrap>服务IP：&nbsp;</td>
                      <td align="left" class="infoContentTD" width="30%">&nbsp; ${model.service_ip}</td>
                    </tr>

                    <tr>
                      <td align="right" class="infoLabelTD" width="20%" nowrap>资源状态：&nbsp;</td>
                      <td align="left" class="infoContentTD" width="30%">&nbsp; 
                      	<ext:property cachetype="P_TYPE_VALUE" resultprop="type_value_name" condnames="type_code;type_value_code" condvalues="114;${model.rsc_status}" />
                      </td>
                    </tr>

                    <tr>
                      <td align="right" class="infoLabelTD" width="20%" nowrap>资源类型：&nbsp;</td>
                      <td align="left" class="infoContentTD" width="30%">&nbsp; ${model.rsc_type}</td>
                    </tr>

                    <tr>
                      <td align="right" class="infoLabelTD" width="20%" nowrap>管理账号：&nbsp;</td>
                      <td align="left" class="infoContentTD" width="30%">&nbsp; ${model.manage_acc}</td>
                    </tr>
                    
                    <tr>
                      <td align="right" class="infoLabelTD" width="20%" nowrap>数据库：&nbsp;</td>
                      <td align="left" class="infoContentTD" width="30%">&nbsp; ${model.sid_service_dbname}</td>
                    </tr>
                    
                    <tr>
                      <td align="right" class="infoLabelTD" width="20%" nowrap>协议：&nbsp;</td>
                      <td align="left" class="infoContentTD" width="30%">&nbsp;
	                    <c:forEach var="each" items="${model.pro_portItemList}" varStatus="s">
	                    	${each.pro_name }&nbsp;&nbsp;&nbsp;
	                    </c:forEach>						
					  </td>
                    </tr>                                       
                    
                    <tr>
                      <td align="right" class="infoLabelTD" width="20%" nowrap>描述：&nbsp;</td>
                      <td align="left" class="infoContentTD" width="30%">&nbsp; ${model.rsc_desc}</td>
                    </tr>                                        
                    
                    <tr>
                      <td align="right" class="infoLabelTD" colspan="2" nowrap="nowrap">&nbsp;</td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
	    <tr height="350px">
	        <td>
	          <table id="listTable"></table>
	        </td>
	    </tr>
      </table>
</body>
</html>